<template>
    <view @click="backTop" class="back-top" :class="isShowBackTop ? 'show': ''">
        <text class="icon iconfont icon-fanhuidingbu1"></text>
    </view>
</template>

<script setup>
defineProps({
    'isShowBackTop': {
        type: Boolean,
        default: false
    }
})

const emit = defineEmits(['backTop'])

const backTop = () => {
    emit('backTop')
}
</script>

<style lang="scss">
.back-top {
    right: 40rpx;
    bottom: 160rpx;
    position: absolute;
    height: 80rpx;
    line-height: 80rpx;
    width: 80rpx;
    z-index: 20;
    border-radius: 50%;
    text-align: center;
    background-color: #008000;
    transform: scale(0);
    transition: all 0.2s linear;
    .icon {
        color: #fff;
        font-size: 60rpx;
    }

}
.show {
    transform: scale(1);
}
</style>